:root {
    --background-color: #2c3e50;
    --border-color: #7591AD;
    --text-color: #34495e;
    --color1: #EC3E27;
    --color2: #fd79a8;
    --color3: #0984e3;
    --color4: #00b894;
    --color5: #fdcb6e;
    --color6: #e056fd;
    --color7: #F97F51;
    --color8: #BDC581;
    --a_border_color: #86a3b3;
    --h2_border_color: #8ea2b8;
    --a_hover_background_color: #86a3b3;
    --font_color: #e8f6fd;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
}

.card {
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    width: 300px;
    height: 450px;
    overflow: hidden;
    margin: 20px;
    background-color: var(--border-color);
    border-radius: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    box-shadow: 0 0 30px #2c2c2c;
    color: var(--font_color);
}

.photo {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 0 20px #111;
    transition: 0.5s;
}
.phote::before{
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    background-image: -moz-linear-gradient(to top,#333,transparent);
}
.card:hover .phote::before{
    display: none;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover .photo {
    top: 30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

h1 {
    position: absolute;
    top: 370px;
    transition: .5s;
}

.card:hover h1 {
    position: absolute;
    top: 170px;
}

h2 {
    margin-top: 220px;
    width: 80%;
    font-weight: normal;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--h2_border_color);
}

p {
    width: 90%;
    text-align: 2em;
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 30px;
}

a {
    color: var(--font_color);
    text-decoration: none;
    padding: 12px 36px;
    border: 1px solid var(--a_border_color);
    border-radius: 8px;
}

a:hover {
    color: #fff;
    background-color: var(--a_hover_background_color);
}